package com.ftg.learn.framework.mybatis.javabase;

import org.apache.ibatis.session.SqlSession;

/**
 * 说明性文件
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/9/6 上午10:10
 */
public class Exam01 {

    public static void main(String[] args) {
        Zong zong = new Zong();

        String reg = "^[0-9]{1,3}[a-z]{1,3/////}$";


        SqlSession ss = zong.getSession();
        try{
            //全新的session
            StudentMapper sm = ss.getMapper(StudentMapper.class);
            int n = sm.saveStudent("ttt","男");
            System.out.println(n);

            zong.commitSession(ss);
        }catch (Exception e){
            zong.rollBack(ss);
        }finally {
            zong.closeSession(ss);
        }

    }

}
